package errcode

import (
	"git.myscrm.cn/golang/common/ykerrcode"
)

//第一位数字表示类型，第二～第四位表示模块，第五到第八位表示具体场景错误码
// 用户模块错误码定义
const (
	USER_BIND_ERROR             = 20020000
	USER_NOT_LOGIN              = 20020001
	USER_ALREADY_DISALBED       = 20020002
	USER_LOGIN_ERROR            = 20020003
	USER_ALREADY_BIND           = 20020004
	USER_BIND_MOBILE_NOT_EXISTS = 20020005
	USER_OPENID_ALREADY_BIND    = 20020006
	USER_LOGIN_NOT_BIND         = 20020007
	USER_BIND_DISABLED          = 20020008
)

func init() {
	dict := map[interface{}]string{
		USER_BIND_ERROR:             "绑定失败",
		USER_NOT_LOGIN:              "用户未登录",
		USER_ALREADY_DISALBED:       "用户已经被禁用，无法登录",
		USER_LOGIN_ERROR:            "登录失败",
		USER_ALREADY_BIND:           "绑定失败，用户已经被绑定",
		USER_BIND_MOBILE_NOT_EXISTS: "绑定失败，手机号不存在",
		USER_OPENID_ALREADY_BIND:    "绑定失败，openid已经被绑定",
		USER_BIND_DISABLED:          "绑定失败，用户已经被禁用",
		USER_LOGIN_NOT_BIND:         "用户未绑定，无法登录",
	}
	ykerrcode.RegisterErrMsg(dict)
}
